From 181547a25213bee8a20002e07344b957386c4d0f Mon Sep 17 00:00:00 2001 From: Pauline Date: Sun, 26 Nov 2023 22:55:04 -0500 Subject: feat(build): transfer everything to esm/ts --- apps/website/src/pages/blog/[...slug].astro | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apps/website/src/pages/blog/[...slug].astro (limited to 'apps/website/src/pages/blog/[...slug].astro') diff --git a/apps/website/src/pages/blog/[...slug].astro b/apps/website/src/pages/blog/[...slug].astro new file mode 100644 index 0000000..d9995e7 --- /dev/null +++ b/apps/website/src/pages/blog/[...slug].astro @@ -0,0 +1,25 @@ +--- +// i hate u astro vscode extensi on/j +/// +import { type CollectionEntry, getCollection } from 'astro:content'; +import BlogPost from '../../layouts/BlogPost.astro'; + +export async function getStaticPaths() { + const posts = await getCollection('blog'); + return posts.map(post => ({ + params: { slug: post.slug }, + props: post, + })); +} + +type Props = CollectionEntry<'blog'>; + +const post = Astro.props; +const { Content } = await post.render(); +--- + + + + + + -- cgit